import Mock from 'mockjs'

const classroomBook = Mock.mock([
    {
        bookname: '化学原理1',
        bookid:'0',
        data:[
            'https://t7.baidu.com/it/u=2168645659,3174029352&fm=193&f=GIF',
            'https://t7.baidu.com/it/u=2168645659,3174029352&fm=193&f=GIF',
            'https://t7.baidu.com/it/u=2168645659,3174029352&fm=193&f=GIF',
            // 'https://t7.baidu.com/it/u=2168645659,3174029352&fm=193&f=GIF',  
        ]
    },
    {
        bookname: '化学原理2',
        bookid:'1',
        data:[
            'https://t7.baidu.com/it/u=518698083,437784578&fm=193&f=GIF',
            'https://t7.baidu.com/it/u=518698083,437784578&fm=193&f=GIF',
            'https://t7.baidu.com/it/u=518698083,437784578&fm=193&f=GIF',
        ]
    },
    {
        bookname: '化学实验',
        bookid:'2',
        data:[
            'https://t7.baidu.com/it/u=3698389523,922640142&fm=193&f=GIF',
            'https://t7.baidu.com/it/u=3698389523,922640142&fm=193&f=GIF',
            'https://t7.baidu.com/it/u=3698389523,922640142&fm=193&f=GIF',
        ]
    },
])

Mock.mock('/getclassroombook', 'post', (config) => {
    // console.log(config.body.subject);
    // console.log('有人请求了这个接口, 我返回了一个data')
    return classroomBook
})

const func = Mock.mock([
    {
        bookname: '化学原理1',
        bookid:'0',
    },
    {
        bookname: '化学原理2',
        bookid:'1',
    },
    {
        bookname: '化学实验',
        bookid:'2',
    },
])

Mock.mock('/getfunction', 'get', () => {
    // console.log('有人请求了这个接口, 我返回了一个data')
    return func
})

